<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:forgeview="http://jboss.org/forge/view"
	template="/resources/scaffold/pageTemplate.xhtml">

	<f:metadata>
		<f:viewParam name="id" value="#{phoneNoBean.id}"/>
		<f:event type="preRenderView" listener="#{phoneNoBean.retrieve}"/>
	</f:metadata>

	<ui:param name="pageTitle" value="View Phone No"/>

	<ui:define name="header">
		Phone No
	</ui:define>

	<ui:define name="subheader">
		View existing Phone No
	</ui:define>

	<ui:define name="footer"/>

	<ui:define name="main">
		<h:panelGrid columnClasses="label,component,required" columns="3">
			<h:outputLabel for="phoneNoBeanPhoneNoUser" value="User:"/>
			<h:link id="phoneNoBeanPhoneNoUser" outcome="/user/view" value="#{phoneNoBean.phoneNo.user}">
				<f:param name="id" value="#{phoneNoBean.phoneNo.user.id}"/>
			</h:link>
			<h:outputText/>
			<h:outputLabel for="phoneNoBeanPhoneNoTypePhone" value="Type Phone:"/>
			<h:link id="phoneNoBeanPhoneNoTypePhone" outcome="/typePhone/view" value="#{phoneNoBean.phoneNo.typePhone}">
				<f:param name="id" value="#{phoneNoBean.phoneNo.typePhone.id}"/>
			</h:link>
			<h:outputText/>
			<h:outputLabel for="phoneNoBeanPhoneNoPhoneNo" value="Phone No:"/>
			<h:outputText id="phoneNoBeanPhoneNoPhoneNo" value="#{phoneNoBean.phoneNo.phoneNo}"/>
			<h:outputText/>
			<h:outputLabel for="phoneNoBeanPhoneNoModifiedOn" value="Modified On:"/>
			<h:outputText id="phoneNoBeanPhoneNoModifiedOn" value="#{phoneNoBean.phoneNo.modifiedOn}">
				<f:convertDateTime type="date"/>
			</h:outputText>
			<h:outputText/>
			<h:outputLabel for="phoneNoBeanPhoneNoStocks" value="Stocks:"/>
			<h:dataTable id="phoneNoBeanPhoneNoStocks" styleClass="data-table" value="#{forgeview:asList(phoneNoBean.phoneNo.stocks)}" var="_item">
				<h:column>
					<f:facet name="header">
						<h:outputText value="Table Id"/>
					</f:facet>
					<h:link outcome="/stock/view">
						<f:param name="id" value="#{_item.id}"/>
						<h:outputText id="itemTableId" value="#{_item.tableId}"/>
					</h:link>
				</h:column>
			</h:dataTable>
			<h:outputText/>
			<h:outputLabel for="phoneNoBeanPhoneNoStocks1" value="Stocks_1:"/>
			<h:dataTable id="phoneNoBeanPhoneNoStocks1" styleClass="data-table" value="#{forgeview:asList(phoneNoBean.phoneNo.stocks_1)}" var="_item">
				<h:column>
					<f:facet name="header">
						<h:outputText value="Table Id"/>
					</f:facet>
					<h:link outcome="/stock/view">
						<f:param name="id" value="#{_item.id}"/>
						<h:outputText id="itemTableId" value="#{_item.tableId}"/>
					</h:link>
				</h:column>
			</h:dataTable>
			<h:outputText/>
		</h:panelGrid>

		<div class="buttons">
			<h:link value="View All" outcome="search" styleClass="btn btn-primary"/> 
			<h:link value="Edit" outcome="create" includeViewParams="true" styleClass="btn btn-primary"/>
			<h:link value="Create New" outcome="create" styleClass="btn btn-primary"/>
		</div>
	</ui:define>

</ui:composition>